Tootsville::Infinity-Click

Function

Infinity-Click names a function, with lambda list (D USER RECIPIENT/S):

Used by the client to report a mouse click or finger tap.

Lisp CLICK = JSON click

Usage

If the user clicks on a placed-item, this method should be called with the following syntax:

{ on: ITEM-ID, x: X, y: Y, z: Z, with: MODS }

Note that the (x,y,z) values passed are relative to the origin point of the item; thus, if an item is placed at (200,200,200) and is clicked at (210,210,210), the coördinates reported should be (10,10,10).

If the user clicks on the ground, normally it will result in walking, but it could instead be reported as:

{ x: X, y: Y, z: Z, with: MODS }

Modifiers characters

The modifiers string can contain any of the following symbols in any order, representing modifier keys that were held down when the user clicked on the item:

^

Caret represents the @key{Control} or @key{Ctrl} key on Linux® or Windows systems, or the @key{Command} key on macOS™.

S

Ess represents the @key{Shift} key on any platform.

C

Ci represents the @key{Caps Lock} state being enabled. May be ignored or omitted.

N

En represents the @key{Num Lock} state being enabled. May be ignored or omitted.

M

Em represents the @key{Meta} key on Linux, @key{Alt} on Linux or Windows, or @key{Option} on macOS.

L

Ell represents the @key{Scroll Lock} state being enabled. May be ignored or omitted.

A

Ay represents the @key{Alt-Gr} key on any platform (if supported). May be ignored or omitted.

*

Asterisk represents the @key{Super} key on Linux or @key{Windows-Logo} key on Windows.

1, 2, 3
Numbers represent mouse buttons: 1 for left, 2 for middle, 3 for right.

+, -
Plus represents rolling a scroll wheel down; Minus to scroll up

<, >
Less-than represents rolling a scroll knob left; greater-than, right.

Flash details

In the Flash MouseEvent object, you can create the "mods" with the following:

var mods:String = "";
if (ev.altKey) mods += "M";
if (ev.commandKey || ev.ctrlKey) mods += "^";
if (ev.shiftKey) mods += "S";
if (ev.type == ev.CLICK) mods += "1";
if (ev.type == ev.MIDDLE_CLICK) mods += "2";
if (ev.type == ev.RIGHT_CLICK) mods += "3";
if (ev.type == ev.MOUSE_WHEEL)
{ if (ev.delta < 0) mods += "-";
  if (ev.delta > 0) mods += "+"; }
if (Keyboard.numLock) mods += "N";
if (Keyboard.capsLock) mods += "C";

Changes from 1.2 to 2.0

202 Accepted

The click event has been noted. Any outcomes of that event will be broadcast over other channels.

204 No Content

The click event is being ignored; ITEM-ID was not an interesting item to the server.

File

Defined in file src/infinity/legacy-commands.lisp.